{% extends 'page-builder-base.twig' %}
{% set bodyClasses = 'page-lda single' %}


{% block title %}
<title>{{title}} | {{siteTitle}}</title>
{% endblock %}


	    		{% block sitenav %}
{% endblock %}

{% block content %}
    <section>
		<div class="inner">
		    {% block pageheading %}
			    {% if page.metadata.heading %}
			        <h1>{{ page.metadata.heading }}</h1>
			    {% endif %}
		    {% endblock %}

			
			
			<div class="content">
			    {%for contentBlock in page.contentBlocks %}
			        {% block contentBlock %}
					<div id="msg"></div>
					<form method="post" action="">
						<li class="dob">
							<label for="">Date of birth</label>
							<div class="selects">
								<select id="day"></select>
								<select id="month"></select>
								<select id="year"></select>
							</div>
						</li>
						<li class="country">
							<label for="">Country</label>
							<select id="country">
							    <option value="4540499">New Zealand</option>
			            	    <option value="4540339">Afghanistan</option>
			            	    <option value="4540340">Albania</option>
			            	    <option value="4540341">Algeria</option>
			            	    <option value="4540342">American Samoa</option>
			            	    <option value="4540343">Andorra</option>
			            	    <option value="4540344">Angola</option>
			            	    <option value="4540345">Anguilla</option>
			            	    <option value="4540346">Antigua &amp; Barbuda</option>
			            	    <option value="4540347">Argentina</option>
			            	    <option value="4540348">Armenia</option>
			            	    <option value="4540349">Aruba</option>
			            	    <option value="4540350">Australia</option>
			            	    <option value="4540351">Austria</option>
			            	    <option value="4540352">Azerbaijan</option>
			            	    <option value="4540353">Azores</option>
			            	    <option value="4540354">Bahamas</option>
			            	    <option value="4540355">Bahrain</option>
			            	    <option value="4540356">Bangladesh</option>
			            	    <option value="4540357">Barbados</option>
			            	    <option value="4540358">Belarus</option>
			            	    <option value="4540359">Belgium</option>
			            	    <option value="4540360">Belize</option>
			            	    <option value="4540361">Benin</option>
			            	    <option value="4540362">Bermuda</option>
			            	    <option value="4540363">Bhutan</option>
			            	    <option value="4540364">Bolivia</option>
			            	    <option value="4540365">Bonaire</option>
			            	    <option value="4540366">Bosnia &amp; Herzegovina</option>
			            	    <option value="4540367">Botswana</option>
			            	    <option value="4540368">Brazil</option>
			            	    <option value="4540369">British Indian Ocean Ter</option>
			            	    <option value="4540370">Brunei</option>
			            	    <option value="4540371">Bulgaria</option>
			            	    <option value="4540372">Burkina Faso</option>
			            	    <option value="4540373">Burundi</option>
			            	    <option value="4540374">Cambodia</option>
			            	    <option value="4540375">Cameroon</option>
			            	    <option value="4540376">Canada</option>
			            	    <option value="4540377">Canary Islands</option>
			            	    <option value="4540378">Cape Verde</option>
			            	    <option value="4540379">Cayman Islands</option>
			            	    <option value="4540380">Central African Republic</option>
			            	    <option value="4540381">Chad</option>
			            	    <option value="4540382">Channel Islands</option>
			            	    <option value="4540383">Chile</option>
			            	    <option value="4540384">China</option>
			            	    <option value="4540385">Christmas Island</option>
			            	    <option value="4540386">Cocos Island</option>
			            	    <option value="4540387">Colombia</option>
			            	    <option value="4540388">Comoros</option>
			            	    <option value="4540389">Congo</option>
			            	    <option value="4540390">Congo Democratic Rep</option>
			            	    <option value="4540391">Cook Islands</option>
			            	    <option value="4540392">Costa Rica</option>
			            	    <option value="4540393">Cote D&#x27;Ivoire</option>
			            	    <option value="4540394">Croatia</option>
			            	    <option value="4540395">Cuba</option>
			            	    <option value="4540396">Curacao</option>
			            	    <option value="4540397">Cyprus</option>
			            	    <option value="4540398">Czech Republic</option>
			            	    <option value="4540399">Denmark</option>
			            	    <option value="4540400">Djibouti</option>
			            	    <option value="4540401">Dominica</option>
			            	    <option value="4540402">Dominican Republic</option>
			            	    <option value="4540403">East Timor</option>
			            	    <option value="4540404">Ecuador</option>
			            	    <option value="4540405">Egypt</option>
			            	    <option value="4540406">El Salvador</option>
			            	    <option value="4540407">Equatorial Guinea</option>
			            	    <option value="4540408">Eritrea</option>
			            	    <option value="4540409">Estonia</option>
			            	    <option value="4540410">Ethiopia</option>
			            	    <option value="4540411">Falkland Islands</option>
			            	    <option value="4540412">Faroe Islands</option>
			            	    <option value="4540413">Fiji</option>
			            	    <option value="4540414">Finland</option>
			            	    <option value="4540415">France</option>
			            	    <option value="4540416">French Guiana</option>
			            	    <option value="4540417">French Polynesia</option>
			            	    <option value="4540418">French Southern Ter</option>
			            	    <option value="4540419">Gabon</option>
			            	    <option value="4540420">Gambia</option>
			            	    <option value="4540421">Georgia</option>
			            	    <option value="4540422">Germany</option>
			            	    <option value="4540423">Ghana</option>
			            	    <option value="4540424">Gibraltar</option>
			            	    <option value="4540425">Great Britain</option>
			            	    <option value="4540426">Greece</option>
			            	    <option value="4540427">Greenland</option>
			            	    <option value="4540428">Grenada</option>
			            	    <option value="4540429">Guadeloupe</option>
			            	    <option value="4540430">Guam</option>
			            	    <option value="4540431">Guatemala</option>
			            	    <option value="4540432">Guernsey</option>
			            	    <option value="4540433">Guinea</option>
			            	    <option value="4540434">Guinea-Bissau</option>
			            	    <option value="4540435">Guyana</option>
			            	    <option value="4540436">Haiti</option>
			            	    <option value="4540437">Honduras</option>
			            	    <option value="4540438">Hong Kong</option>
			            	    <option value="4540439">Hungary</option>
			            	    <option value="4540440">Iceland</option>
			            	    <option value="4540441">India</option>
			            	    <option value="4540442">Indonesia</option>
			            	    <option value="4540443">Iran</option>
			            	    <option value="4540444">Iraq</option>
			            	    <option value="4540445">Ireland</option>
			            	    <option value="4540446">Isle of Man</option>
			            	    <option value="4540447">Israel</option>
			            	    <option value="4540448">Italy</option>
			            	    <option value="4540449">Jamaica</option>
			            	    <option value="4540450">Japan</option>
			            	    <option value="4540451">Jersey</option>
			            	    <option value="4540452">Jordan</option>
			            	    <option value="4540453">Kazakhstan</option>
			            	    <option value="4540454">Kenya</option>
			            	    <option value="4540455">Kiribati</option>
			            	    <option value="4540456">Korea North</option>
			            	    <option value="4540457">Korea South</option>
			            	    <option value="4540458">Kuwait</option>
			            	    <option value="4540459">Kyrgyzstan</option>
			            	    <option value="4540460">Laos</option>
			            	    <option value="4540461">Latvia</option>
			            	    <option value="4540462">Lebanon</option>
			            	    <option value="4540463">Lesotho</option>
			            	    <option value="4540464">Liberia</option>
			            	    <option value="4540465">Libya</option>
			            	    <option value="4540466">Liechtenstein</option>
			            	    <option value="4540467">Lithuania</option>
			            	    <option value="4540468">Luxembourg</option>
			            	    <option value="4540469">Macau</option>
			            	    <option value="4540470">Macedonia</option>
			            	    <option value="4540471">Madagascar</option>
			            	    <option value="4540472">Malawi</option>
			            	    <option value="4540473">Malaysia</option>
			            	    <option value="4540474">Maldives</option>
			            	    <option value="4540475">Mali</option>
			            	    <option value="4540476">Malta</option>
			            	    <option value="4540477">Marshall Islands</option>
			            	    <option value="4540478">Martinique</option>
			            	    <option value="4540479">Mauritania</option>
			            	    <option value="4540480">Mauritius</option>
			            	    <option value="4540481">Mayotte</option>
			            	    <option value="4540482">Mexico</option>
			            	    <option value="4540483">Midway Islands</option>
			            	    <option value="4540484">Moldova</option>
			            	    <option value="4540485">Monaco</option>
			            	    <option value="4540486">Mongolia</option>
			            	    <option value="4540487">Montenegro</option>
			            	    <option value="4540488">Montserrat</option>
			            	    <option value="4540489">Morocco</option>
			            	    <option value="4540490">Mozambique</option>
			            	    <option value="4540491">Myanmar</option>
			            	    <option value="4540492">Namibia</option>
			            	    <option value="4540493">Nauru</option>
			            	    <option value="4540494">Nepal</option>
			            	    <option value="4540495">Netherland Antilles</option>
			            	    <option value="4540496">Netherlands</option>
			            	    <option value="4540497">Nevis</option>
			            	    <option value="4540498">New Caledonia</option>
			            	    <option value="4540500">Nicaragua</option>
			            	    <option value="4540501">Niger</option>
			            	    <option value="4540502">Nigeria</option>
			            	    <option value="4540503">Niue</option>
			            	    <option value="4540504">Norfolk Island</option>
			            	    <option value="4540505">Norway</option>
			            	    <option value="4540506">Oman</option>
			            	    <option value="4540507">Pakistan</option>
			            	    <option value="4540508">Palau Island</option>
			            	    <option value="4540509">Palestine</option>
			            	    <option value="4540510">Panama</option>
			            	    <option value="4540511">Papua New Guinea</option>
			            	    <option value="4540512">Paraguay</option>
			            	    <option value="4540513">Peru</option>
			            	    <option value="4540514">Philippines</option>
			            	    <option value="4540515">Pitcairn Island</option>
			            	    <option value="4540516">Poland</option>
			            	    <option value="4540517">Portugal</option>
			            	    <option value="4540518">Puerto Rico</option>
			            	    <option value="4540519">Qatar</option>
			            	    <option value="4540520">Reunion</option>
			            	    <option value="4540521">Romania</option>
			            	    <option value="4540522">Russia</option>
			            	    <option value="4540523">Rwanda</option>
			            	    <option value="4540524">Saipan</option>
			            	    <option value="4540525">Samoa</option>
			            	    <option value="4540526">Samoa American</option>
			            	    <option value="4540527">San Marino</option>
			            	    <option value="4540528">Sao newTome &amp; Principe</option>
			            	    <option value="4540529">Saudi Arabia</option>
			            	    <option value="4540530">Senegal</option>
			            	    <option value="4540531">Serbia</option>
			            	    <option value="4540532">Serbia &amp; Montenegro</option>
			            	    <option value="4540533">Seychelles</option>
			            	    <option value="4540534">Sierra Leone</option>
			            	    <option value="4540535">Singapore</option>
			            	    <option value="4540536">Slovakia</option>
			            	    <option value="4540537">Slovenia</option>
			            	    <option value="4540538">Solomon Islands</option>
			            	    <option value="4540539">Somalia</option>
			            	    <option value="4540540">South Africa</option>
			            	    <option value="4540541">South Sudan</option>
			            	    <option value="4540542">Spain</option>
			            	    <option value="4540543">Sri Lanka</option>
			            	    <option value="4540544">St Barthelemy</option>
			            	    <option value="4540545">St Eustatius</option>
			            	    <option value="4540546">St Helena</option>
			            	    <option value="4540547">St Kitts-Nevis</option>
			            	    <option value="4540548">St Lucia</option>
			            	    <option value="4540549">St Maarten</option>
			            	    <option value="4540550">St Pierre &amp; Miquelon</option>
			            	    <option value="4540551">St Vincent &amp; Grenadines</option>
			            	    <option value="4540552">Sudan</option>
			            	    <option value="4540553">Suriname</option>
			            	    <option value="4540554">Swaziland</option>
			            	    <option value="4540555">Sweden</option>
			            	    <option value="4540556">Switzerland</option>
			            	    <option value="4540557">Syria</option>
			            	    <option value="4540558">Tahiti</option>
			            	    <option value="4540559">Taiwan</option>
			            	    <option value="4540560">Tajikistan</option>
			            	    <option value="4540561">Tanzania</option>
			            	    <option value="4540562">Thailand</option>
			            	    <option value="4540563">Togo</option>
			            	    <option value="4540564">Tokelau</option>
			            	    <option value="4540565">Tonga</option>
			            	    <option value="4540566">Trinidad &amp; Tobago</option>
			            	    <option value="4540567">Tunisia</option>
			            	    <option value="4540568">Turkey</option>
			            	    <option value="4540569">Turkmenistan</option>
			            	    <option value="4540570">Turks &amp; Caicos Is</option>
			            	    <option value="4540571">Tuvalu</option>
			            	    <option value="4540572">Uganda</option>
			            	    <option value="4540573">Ukraine</option>
			            	    <option value="4540574">United Arab Emirates</option>
			            	    <option value="4540575">United Kingdom</option>
			            	    <option value="4540576">United States of America</option>
			            	    <option value="4540577">Uruguay</option>
			            	    <option value="4540578">Uzbekistan</option>
			            	    <option value="4540579">Vanuatu</option>
			            	    <option value="4540580">Vatican City State</option>
			            	    <option value="4540581">Venezuela</option>
			            	    <option value="4540582">Vietnam</option>
			            	    <option value="4540583">Virgin Islands (Brit)</option>
			            	    <option value="4540584">Virgin Islands (USA)</option>
			            	    <option value="4540585">Wake Island</option>
			            	    <option value="4540586">Wallis &amp; Futana Is</option>
			            	    <option value="4540587">Yemen</option>
			            	    <option value="4540588">Zambia</option>
			            	    <option value="4540589">Zimbabwe</option>
							</select>						
						</li>
						<li class="remember">
							<input id="remember-cb" class="checkbox" type="checkbox" name="" value="" />
							<label for="remember-cb">Remember me?</label>
						</li>
						<li>
							<input class="submit button" type="submit" name="" value="Enter site &rsaquo;" onclick="check(event);"/>
						</li>						
					</form>
					
					
					
					
			        <div id="id-{{contentBlock.class}}" class="content-block">
			            {% if contentBlock.title %}
			                <h2 class="title">{{contentBlock.title}}</h2>
			            {% endif %}
			            {{contentBlock.content|raw}}
			        </div>
			        
			        {% endblock%}
			    {% endfor%}
			</div>
	
		       

    		
    	
    	
    	
    	</div><!-- .inner -->
    </section>

{% endblock %}


{% block aside %}
{% endblock %}



{% block externalFoot %}
	{{ parent() }}
	
	<script>
	   window.onload = init;
	
	   function check(ev) {
		   ev.preventDefault();
		   
	       var selDay = $('#day :selected').val();
		   var selMth = $('#month :selected').val();
		   var selYr = $('#year :selected').val();
	
		   var born = new Date(selYr, selMth - 1, selDay);
		   var now = new Date();
		   var age = (now.getTime() - born.getTime()) / (86400000 * 365);
		   
		   if (age <= 18) {
		       $('#msg').html('<div class="formValidationError">Sorry, you need to be 18 years or older to access the Kumeu River site.</div>'); 
			   return;
		   }
	
		   if ($('#remember-cb').is(':checked')) {
		       setCookie('approval', 1, new Date(2050, 11, 31).toGMTString());
		       setCookie('dob', born.toLocaleDateString(), new Date(2050, 11, 31).toGMTString());
		       setCookie('country', $('#country :selected').text(), new Date(2050, 11, 31).toGMTString());
		   } else {
		       setCookie('approval', 1, 0);
		       setCookie('dob', born.toLocaleDateString(), 0);
		       setCookie('country', $('#country :selected').text(), 0);
		   }
		   location.href = 'http://{{ constant('SITE_DOMAIN') }}';
	   }
	   
	   function init() {
		   setup();
		   $('#month').on('change', setup); 
		   $('#year').on('change', setup); 
	   };
	   
	   function setup() {
		   var selDay = ($('#day :selected').val() == undefined) ? 1 : $('#day :selected').val();
		   var selMth = ($('#month :selected').val() == undefined) ? 1 : $('#month :selected').val();
		   var selYr = ($('#year :selected').val() == undefined) ? new Date().getFullYear() : $('#year :selected').val();
	
		   $('#month').empty();
		   $('#year').empty();
		   $('#day').empty();
		   
		   var monthNames = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ];
		   for (var i = 1, il = 13; i < il; i++) {
		     $('#month').append('<option value="' + i + '"' + ((i == selMth) ? ' selected="selected"' : '') + '>' + monthNames[i - 1] + '</option>');
		   }
		   for (var i = 1900, il = 2015; i < il; i++) {
		     $('#year').append('<option value="' + i + '"' + ((i == selYr) ? ' selected="selected"' : '') + '>' + i + '</option>');
		   }
	       for (var i = 1, il = 32; i < il; i++) {
		     if ((selMth == 4 || selMth == 6 || selMth == 9 || selMth == 11) && i >= 31) {
			     continue;
			 }
		     if ((selMth == 2 && (selYr % 4 != 0)) && i >= 29) {
			     continue;
			 }
		     if ((selMth == 2 && (selYr % 4 == 0)) && i >= 30) {
			     continue;
			 }
		     $('#day').append('<option value="' + i + '"' + ((i == selDay) ? ' selected="selected"' : '') + '>' + i + '</option>');
		   }
	   }
	
	   function setCookie(cname,cvalue,expires){var expires="expires="+expires;document.cookie=cname+"="+cvalue+"; "+expires+";domain=.{{ constant('SITE_DOMAIN') }};path=/"}
	</script>
{% endblock %}


